import grails.test.*

class OrganizeTests extends GrailsUnitTestCase  {
    protected void setUp() {
        super.setUp()
    }

    protected void tearDown() {
        super.tearDown()
    }

    void testSave() {
        Organize org = new Organize(name:"org")
        assertNotNull org.save()
        assertEquals  1, Organize.count()
    }
    void testSchoolAndOrg() {
        def school = School.build()
        def org = Organize.build()

        org.school = school
        assertNotNull school.save()
        assertNotNull org.save()

        assertEquals  1 , Organize.countBySchool(school)
    
    }

}
